#ifndef PROTOMSG_PROTOCOL_H_
#define PROTOMSG_PROTOCOL_H_
#include "protocol_config.h"
#include "serialization.h"
#include "protocol_descriptor.h"

namespace protomsg {
  // a message is the representation of the collection of the MessageField 
  // which is able to be  serialization ,in addition , it
  // contains the protocol of this specific message . Message can construct
  // by hand or just created automatically by the input protocol definition .

  class MessageProtocol : public Serialization {
  public:
    virtual void Serializing( SerializedData* data ) ;
  private:
    // the reference of the protocol descriptor
    ProtocolDescriptorReference descriptor_ref_;
    friend class SerializedData;
    friend class DeserializedData;
  };

}
#endif// PROTOMSG_PROTOCOL_H_